<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Getting Started</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="ODTONE 0.4">
<link rel="up" href="../index.html" title="ODTONE 0.4">
<link rel="prev" href="intro.html" title="Introduction">
<link rel="next" href="mihf_internals.html" title="ODTONE MIHF internals">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src=".././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="intro.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="mihf_internals.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="odtone.getStart"></a><a class="link" href="getStart.html" title="Getting Started">Getting Started</a>
</h2></div></div></div>
<h2>
<a name="odtone.getStart.h0"></a>
      <span><a name="odtone.getStart.installation"></a></span><a class="link" href="getStart.html#odtone.getStart.installation">Installation</a>
    </h2>
<p>
      As ODTONE is developed to work in several platforms, we won't provide detailed
      tutorials for each mainstream operating system. We will rather present the
      main guidelines for installing ODTONE and any relevant notes on specific platforms
      that might prove an obstacle.
    </p>
<h4>
<a name="odtone.getStart.h1"></a>
      <span><a name="odtone.getStart.1__required_dependencies"></a></span><a class="link" href="getStart.html#odtone.getStart.1__required_dependencies">1.
      Required Dependencies</a>
    </h4>
<p>
      In order to correctly use ODTONE, you must first make sure that you have the
      required dependencies:
    </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
          <span class="bold"><strong>Boost Developer libraries (v1.48)</strong></span>
        </li></ul></div>
<h5>
<a name="odtone.getStart.h2"></a>
      <span><a name="odtone.getStart.1_1__boost_quick_guide"></a></span><a class="link" href="getStart.html#odtone.getStart.1_1__boost_quick_guide">1.1.
      Boost Quick Guide</a>
    </h5>
<p>
      Boost is required to compile ODTONE, so in order to correctly use ODTONE you
      must first make sure you have the Boost libraries sources and Boost.Build installed
      in your system.
    </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
          Download the Boost library(v1.48) <a href="http://www.boost.org/" target="_top">boost's
          website</a> and unpack it. We recommend that you unpack it in a project
          directory next to odtone.
        </li></ul></div>
<p>
</p>
<pre class="programlisting">projects/
    |
    +-- boost_1_48_0/
    |
    +-- odtone/
</pre>
<p>
    </p>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
          Install Boost.Build (if your already have it, skip this step). To compile
          the Boost.Build engine, you can use the bootstrap script from the Boost
          library sources and then you can copy the resulting binary (b2) to a proper
          place (within your $PATH). To finish the Boost.Build installation, you
          must tell Boost.Build engine where to find the remaining of Boost.Build.
          To do it, you can setup a boost-build.jam file in a parent directory relative
          to the odtone root. Example:
        </li></ol></div>
<div class="table">
<a name="odtone.getStart.setup_boost_build_jam"></a><p class="title"><b>Table&#160;1.&#160;Setup boost-build.jam</b></p>
<div class="table-contents"><table class="table" summary="Setup boost-build.jam">
<colgroup>
<col>
<col>
</colgroup>
<tbody><tr>
<td>
              <p>
                boost-build.jam
              </p>
            </td>
<td>
              <p>
</p>
<pre class="programlisting">#==============================================================================
# Put this file at the root directory of your project or in any of its parent
# directories. Replace 'path-to-boost' with the path to the boost libraries
# sources.
#
# See the Boost.Build documentation for more details!
#==============================================================================

boost-build path-to-boost/tools/build/v2 ;
        </pre>
<p>
              </p>
            </td>
</tr></tbody>
</table></div>
</div>
<br class="table-break"><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
          To install Boost.Build got to 'boost_1_48_0/tools/build/v2/'. On unix like
          systems run './bootstrap.sh' and then 'sudo ./b2 install'. On windows like
          systems run 'bootstrap.bat' and then 'b2 install'.
        </li></ul></div>
<p>
      To compile ODTONE go to 'odtone' and run 'b2'.
    </p>
<div class="important"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top"><p>
        Consult the Boost.Build documentation for more details
      </p></td></tr>
</table></div>
<h4>
<a name="odtone.getStart.h3"></a>
      <span><a name="odtone.getStart.2__getting_odtone"></a></span><a class="link" href="getStart.html#odtone.getStart.2__getting_odtone">2.
      Getting ODTONE</a>
    </h4>
<p>
      <span class="bold"><strong>In a tarball</strong></span>
    </p>
<p>
      You can get the ODTONE source code tarball from our <a href="http://helios.av.it.pt/projects/odtone/files" target="_top">project
      page</a>. Then just unpack it and you are ready to compile and install
      ODTONE.
    </p>
<p>
      <span class="bold"><strong>From the git repository</strong></span>
    </p>
<p>
      You can create your own local copy of the ODTONE by cloning the git repository
      from <a href="http://helios.av.it.pt/projects/odtone/repository" target="_top">ODTONE
      repository</a>.
    </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
          <span class="bold"><strong>Username:</strong></span> user
        </li>
<li class="listitem">
          <span class="bold"><strong>-- No password</strong></span>
        </li>
</ul></div>
<p>
      To clone the git repository you must run the next command:
</p>
<pre class="programlisting">git clone https://user@helios.av.it.pt/git/odtone/ odtone
</pre>
<p>
    </p>
<h4>
<a name="odtone.getStart.h4"></a>
      <span><a name="odtone.getStart.3__compiling_odtone"></a></span><a class="link" href="getStart.html#odtone.getStart.3__compiling_odtone">3.
      Compiling ODTONE</a>
    </h4>
<p>
      Once you have obtained the ODTONE source code and have assured that you have
      the right dependencies you can compile it. ODTONE does not require any special
      procedures or layout for installation.
    </p>
<div class="table">
<a name="odtone.getStart.platform_support"></a><p class="title"><b>Table&#160;2.&#160;Platform Support</b></p>
<div class="table-contents"><table class="table" summary="Platform Support">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
            </th>
<th>
              <p>
                x86-32
              </p>
            </th>
<th>
              <p>
                x86-64
              </p>
            </th>
<th>
              <p>
                ARM
              </p>
            </th>
</tr></thead>
<tbody>
<tr>
<td>
              <p>
                Linux
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                Windows
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/check.png" alt="check"></span>
              </p>
            </td>
<td>
              <p>
                <span class="inlinemediaobject"><img src=".././images/interrogation.png" alt="interrogation"></span>
              </p>
            </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Linux</strong></span>
      </p>
<p>
        We recommend GCC. Most distributions already come with the necessary pre-requisites,
        you may additionally need to install g++.
      </p>
<p>
        If you get link errors relative to undefined pthread symbols, this means
        that your compiler does not link to pthreads by default. You can either pass
        the "<em class="replaceable"><code>linkflags=-lpthread</code></em>" option to
        bjam. Or, you can also configure the toolset to link to this library, set
        "<em class="replaceable"><code>using gcc : : : &lt;linkflags&gt;-lpthread ;</code></em>"
        without quotes at your user-config.jam.
      </p>
</td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Windows</strong></span>
      </p>
<p>
        We recommend MSVC. You will need to download and install the latest Windows
        SDK. This already comes with all pre-requisite libraries and toolchains.
      </p>
</td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        <span class="bold"><strong>For Android</strong></span>
      </p>
<p>
        Android Bionic headers have several missing definitions for sockets and networking,
        this makes ODTONE impossible to compile with the Android SDK. However, since
        Android is based on linux, it is possible to compile ODTONE with the CodeSourcery
        GNU Toolchain for ARM Processors, at the expense of a bigger binary, since
        we have to link all libraries statically. The target must be arm-none-linux-gnueabi.
      </p>
<p>
        Prebuild binaries are available at <a href="http://www.codesourcery.com/sgpp/lite/arm" target="_top">CodeSourcery</a>
      </p>
<p>
        In order to setup user-config.jam for Android, you must add the following
        line (without quotes):
      </p>
<p>
        "<em class="replaceable"><code>using gcc : android : path-to-toolset/arm-none-linux-gnueabi-g++
        : &lt;linkflags&gt;"-Wl,--whole-archive -lpthread -Wl,--no-whole-archive
        -lc" ;</code></em>"
      </p>
<p>
        To use the Android toolset, pass the command line option "<em class="replaceable"><code>toolset=gcc-android</code></em>"
        while compiling.
      </p>
<p>
        The Android SDK has the necessary tools to run, debug and deploy the ODTONE
        binaries.
      </p>
</td></tr>
</table></div>
<div class="important"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top">
<p>
        By default, only the MIHF, the MIH-User and the Link SAP used in the demo
        are compiled. However, you can compile the remaining entities by defining
        their path during the compilation process.
      </p>
<p>
        Here is an example on how to compile ICMP Link SAP: "b2 app/link_sap_icmp/"
      </p>
<p>
        <span class="bold"><strong>Path of each entity provided by ODTONE:</strong></span>
      </p>
<p>
        *<span class="bold"><strong>MIHF:</strong></span> src/mihf/
      </p>
<p>
        *<span class="bold"><strong>Client:</strong></span> app/client/
      </p>
<p>
        *<span class="bold"><strong>MIH-User:</strong></span> app/mih_usr/
      </p>
<p>
        *<span class="bold"><strong>MIIS RDF Server:</strong></span> app/miis_rdf_server/
      </p>
<p>
        *<span class="bold"><strong>DHCP-User:</strong></span> app/dhcp_usr/
      </p>
<p>
        *<span class="bold"><strong>DNS-User:</strong></span> app/dns_usr/
      </p>
<p>
        *<span class="bold"><strong>Link SAP:</strong></span> app/link_sap/
      </p>
<p>
        *<span class="bold"><strong>ICMP LINK SAP:</strong></span> app/link_sap_icmp/
      </p>
<p>
        *<span class="bold"><strong>Dummyserver:</strong></span> src/dummyserver/
      </p>
</td></tr>
</table></div>
<h4>
<a name="odtone.getStart.h5"></a>
      <span><a name="odtone.getStart.4__generate_doxygen_documentation"></a></span><a class="link" href="getStart.html#odtone.getStart.4__generate_doxygen_documentation">4.
      Generate Doxygen Documentation</a>
    </h4>
<p>
      As a supplement to this documentation, it is possible to generate incode documentation.
      This can be done using Doxygen, which parses the sources and generates the
      documentation. Doxygen uses a configuration file to determine all of its settings.
    </p>
<p>
      To simplify the creation of a configuration file, Doxygen can create a template
      configuration file for you. To do this call Doxygen from the command line with
      the -g option:
    </p>
<pre class="programlisting">doxygen -g &lt;config-file&gt;
</pre>
<p>
      To generate the documentation you can enter:
    </p>
<pre class="programlisting">doxygen &lt;config-file&gt;
</pre>
<h4>
<a name="odtone.getStart.h6"></a>
      <span><a name="odtone.getStart.odtone_user_guide"></a></span><a class="link" href="getStart.html#odtone.getStart.odtone_user_guide">ODTONE
      User Guide</a>
    </h4>
<h5>
<a name="odtone.getStart.h7"></a>
      <span><a name="odtone.getStart.configuration"></a></span><a class="link" href="getStart.html#odtone.getStart.configuration">Configuration</a>
    </h5>
<p>
      <span class="bold"><strong>ODTONE-MIHF</strong></span>
    </p>
<p>
      The MIHF can be configured based on a set of parameters, which can be configured
      either using an configuration file or passing them directly in the command
      line. The available configurable parameters are presented next:
    </p>
<p>
</p>
<pre class="programlisting">MIHF Configuration Options:
   --help                                Display configuration options
   --conf.file arg (=odtone.conf)        Configuration file
   --conf.recv_buff_len arg (=4096)      Receive buffer length
   --mihf.id arg (=mihf)                 MIHF ID
   --mihf.ip arg (=127.0.0.1)            MIHF IP
   --mihf.remote_port arg (=4551)        Remote MIHF communication port
   --mihf.local_port arg (=1025)         Local SAPs communication port
   --mihf.peers arg                      List of peer MIHFs
   --mihf.users arg                      List of local MIH-Users
   --mihf.links arg                      List of local Links SAPs
   --mihf.transport arg (=udp, tcp)      List of supported transport protocols
   --mihf.link_response_time arg (=3000) Link SAP response time (milliseconds)
   --mihf.link_delete arg (=2)           Link SAP response fails to forget
   --mihf.discover arg                   MIHF Discovery Mechanisms Order
   --enable_broadcast                    Allows broadcast messages
   --enable_unsolicited                  Allows unsolicited discovery
   --log arg (=1)                        Log level [0-4]
</pre>
<p>
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        All configurable parameters are self-explained and, therefore, we will only
        mention those that are more complex to configure.
      </p>
<p>
        <span class="bold"><strong>List of peer MIHFs:</strong></span> Comma separated list
        of remote MIHF's.
      </p>
<p>
        Usage: mihf.peers = &lt;mihf id&gt; &lt;ip&gt; &lt;port&gt; &lt;list of supported
        transport protocols&gt;, ...
      </p>
<p>
        <span class="bold"><strong>List of local MIH-Users:</strong></span> Comma separated
        list of local MIH-User SAP.
      </p>
<p>
        Usage: mihf.users = &lt;user sap id&gt; &lt;port&gt; [supported commands&gt;
        &lt;supported queries&gt;], ...
      </p>
<p>
        <span class="bold"><strong>List of local Link SAPs:</strong></span> Comma separated
        list of local MIH Link SAPs.
      </p>
<p>
        Usage: mihf.links = &lt;link sap id&gt; &lt;port&gt; &lt;techonoly type&gt;
        &lt;interface&gt;, ...
      </p>
<p>
        <span class="bold"><strong>List of suppoted transport protocols:</strong></span> Comma
        separed list of the transport protocols available. For now UDP and TCP protocols
        are supported.
      </p>
<p>
        Usage: mihf.transport = &lt;udp/tcp&gt;, ...
      </p>
</td></tr>
</table></div>
<p>
      <span class="bold"><strong>SAP's</strong></span>
</p>
<pre class="programlisting">MIH Usr Configuration:
   --help                           Display configuration options
   --conf.file arg (=mih_usr.conf)  Configuration file
   --conf.recv_buff_len arg (=4096) Receive buffer length
   --conf.port arg (=1234)          Listening port
   --user.id arg (=user)            MIH-User ID
   --user.commands arg              MIH-User supported commands
   --mihf.ip arg (=127.0.0.1)       Local MIHF IP address
   --mihf.local_port arg (=1025)    Local MIHF communication port
   --dest arg                       MIHF destination
</pre>
<p>
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        All configurable parameters are self-explained and, therefore, we will only
        mention those that are more complex to configure.
      </p>
<p>
        <span class="bold"><strong>List of supported events:</strong></span> Comma separated
        list of the MIH-Users supported commands.
      </p>
<p>
        Usage: command = &lt;command 1&gt;, &lt;command 2&gt;, (...), &lt;command
        N&gt;
      </p>
</td></tr>
</table></div>
<p>
</p>
<pre class="programlisting">MIH Link SAP Configuration:
     --help                           Display configuration options
     --conf.file arg (=link_sap.conf) Configuration file
     --conf.recv_buff_len arg (=4096) Receive buffer length
     --link.id arg (=link)            Link SAP ID
     --link.port arg (=1235)          Listening Port
     --link.tec arg                   Technology type
     --link.link_addr_list arg        Interface address
     --link.event_list arg            List of supported events
     --link.command_list arg          List of supported commands
     --mihf.ip arg (=127.0.0.1)       Local MIHF IP
     --mihf.id arg (=local-mihf)      Local MIHF ID
     --mihf.local_port arg (=1025)    Local MIHF communication port
</pre>
<p>
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>
        All configurable parameters are self-explained and, therefore, we will only
        mention those that are more complex to configure.
      </p>
<p>
        <span class="bold"><strong>Technology type:</strong></span> Network interface card
        technology. Supported values: GSM, GPRS, EDGE, 802.3, Other, 802_11, CDMA2000,
        UMTS, CDMA2000-HRPD, 802_16, 802_20, 802_22.
      </p>
<p>
        Usage: tec = &lt;NIC technology&gt;
      </p>
<p>
        <span class="bold"><strong>Interface Address:</strong></span> Network interface card
        address.
      </p>
<p>
        Usage: link_addr = &lt;interface address&gt;
      </p>
<p>
        <span class="bold"><strong>List of supported events:</strong></span> Comma separated
        list of the Link SAP's supported events.
      </p>
<p>
        Usage: event_list = &lt;link event 1&gt;, &lt;link event 2&gt;, (...), &lt;link
        event N&gt;
      </p>
<p>
        <span class="bold"><strong>List of supported events:</strong></span> Comma separated
        list of the Link SAP's supported commands.
      </p>
<p>
        Usage: command_list = &lt;link command 1&gt;, &lt;link command 2&gt;, (...),
        &lt;link command N&gt;
      </p>
</td></tr>
</table></div>
<h5>
<a name="odtone.getStart.h8"></a>
      <span><a name="odtone.getStart.local_demo"></a></span><a class="link" href="getStart.html#odtone.getStart.local_demo">Local
      Demo</a>
    </h5>
<p>
      The local demo consists in a simple experiment to demonstrate message exchanging
      between the MIHF, the MIH-User and the Link SAP. It allows you to see how events
      are generated by the Link SAP and then reported to a MIH-User that subscribed
      to those events.
    </p>
<p>
      <span class="inlinemediaobject"><img src=".././images/local_demo.png" alt="local_demo"></span>
    </p>
<p>
      <span class="bold"><strong>Configuration</strong></span>
    </p>
<p>
      In order to properly run the local demo you will need to edit the default Link
      SAP configuration in order to identify the interface that it will manage (<span class="emphasis"><em>tec</em></span>
      and <span class="emphasis"><em>link_addr</em></span> parameters).
    </p>
<p>
      <span class="bold"><strong>Running Demo</strong></span>
    </p>
<p>
      The best way to run this demo is to open 3 terminals. On the first terminal
      you must start ODTONE-MIHF and on another terminal you must start the Link
      SAP. You can see that, at Link SAP bootstrap, the Link SAP will register itself
      with its the local MIHF. Now it's time to start the MIH-User with the configurable
      parameter <span class="emphasis"><em>--dest mihf1</em></span>, on your remaining terminal. The
      <span class="emphasis"><em>--dest</em></span> option tells the MIH-User to set the MIHF destination
      field of the message to mihf1.
    </p>
<p>
      If all went well, the MIH-User has requested for the capabilities of the local
      MIHF and printed out some information about the discovered interfaces (those
      that you previously configured on the Link SAP). For each discovered interface,
      the MIH-User will subscribe to all supported events. Now you can trigger some
      events by just disconnecting, disabling or shutting down your network cable/interface
      or wireless card (according to what you configured). You can see that the event
      notifications are propagated from the Link SAP to the MIH-User.
    </p>
<h5>
<a name="odtone.getStart.h9"></a>
      <span><a name="odtone.getStart.remote_demo"></a></span><a class="link" href="getStart.html#odtone.getStart.remote_demo">Remote
      Demo</a>
    </h5>
<p>
      The remote demo shows the ability of a MIH-User to obtain event notifications
      that happen on a Link SAP located on another machine. You are required to have
      two machines for this experiment. The first machine will host an ODTONE-MIHF
      (mihf1) and the MIH-User, while the second will host an ODTONE-MIHF (mihf2)
      and the Link_SAP.
    </p>
<p>
      <span class="inlinemediaobject"><img src=".././images/remote_demo.png" alt="remote_demo"></span>
    </p>
<p>
      <span class="bold"><strong>Configuration</strong></span>
    </p>
<p>
      Autonomous remote MIHF discovery is not taken in consideration, so you need
      to configure the remote MIHF's IP addresses, port and supported transport protocols
      on each one of the MIHFs. Edit the ODTONE-MIHF configuration file and add an
      entry to peers MIHFs in the form:
    </p>
<pre class="programlisting">&lt;mihf_id&gt; &lt;ip&gt; &lt;port&gt; &lt;list of supported transport protocols&gt;
</pre>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
        You need to edit the configuration file on both machines
      </p></td></tr>
</table></div>
<p>
      The mihf1 configuration file must look like:
</p>
<pre class="programlisting">[mihf]
id = mihf1
local_port = 1025
remote_port = 4551
peers = mihf2 &lt;mihf2_IP_address&gt; 4551 udp
transport = udp
</pre>
<p>
    </p>
<p>
      The mihf2 configuration file must look like:
</p>
<pre class="programlisting">[mihf]
id = mihf2
local_port = 1025
remote_port = 4551
peers = mihf1 &lt;mihf1_IP_address&gt; 4551 udp
transport = udp
</pre>
<p>
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
        If you are using an Android emulator, the web traffic is routed through your
        development machine. So, the IP address assigned to Android emulator is the
        IP address of your machine. The development machine can be reached from Android
        emulator through 10.0.2.2.
      </p></td></tr>
</table></div>
<p>
      <span class="bold"><strong>Running Demo</strong></span>
    </p>
<p>
      On the machine that host the mihf2 you must start a terminal and run ODTONE-MIHF.
      Then, on another terminal you must start the Link SAP. On the machine that
      host the mihf1 you must start a terminal and run ODTONE-MIHF. Then, on another
      terminal you must start the MIH-User with the configurable parameter <span class="emphasis"><em>--dest
      mihf2</em></span>. The <span class="emphasis"><em>--dest</em></span> option tells the MIH-User
      to set the MIHF destination field of the frame to mihf2.
    </p>
<p>
      Now, like in the local demo, you can trigger some events by just disconnecting,
      disabling or shutting down your network cable/interface or wireless card (according
      to what you configured). You can see that the event notifications are propagated
      from the Link SAP to the MIH-User.
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Universidade
      Aveiro<br>Copyright &#169; 2009-2012 Instituto
      de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="intro.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="mihf_internals.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
